<?php

namespace app\services\exam;

use app\dao\exam\ExamQuestionDao;
use app\services\BaseService;

class ExamQuestService extends BaseService
{
    public function __construct(ExamQuestionDao $dao)
    {
        $this ->dao = $dao;
    }

    public function index(array $where)
    {
        return $this ->dao -> index($where);
    }

    public function createOrUpdate(array $where)
    {
        if ($where['id']) return $this ->dao ->updateDao($where);
        return  $this ->dao -> create($where);
    }

    public function delete(array $where)
    {
        return $this ->dao -> deleteDao($where);
    }

}